package cn.t16.ms.feign.product;

import cn.t16.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@FeignClient("product-service")
public interface ProductClient {

    @GetMapping("/products/{id}")
    Result get(@PathVariable Integer id);

    @PostMapping("/products")
    Result save(@RequestBody ProductVO product);

    @GetMapping("/products")
    Result getAll();


}
